package cn.com.w.bootdemo.controller;

import cn.com.w.bootdemo.util.SpringContextUtil;
import cn.com.w.bootdemo.vo.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("bean")
public class DemoController {



    @GetMapping("/name")
    public String getBeanName(){

        User bean = SpringContextUtil.getBean(User.class);


        return bean.toString();
    }
}
